import React ,{memo} from 'react';
import {NavLink} from 'react-router-dom'
import {renderRoutes} from 'react-router-config'
import  './index.scss';

import {dicoverMenu} from 'common/local-data.js'

export default memo( function WYDiscover(props) {
    return (
    <div className='discover'>
        <div className='top'>
            {/* 导航 */}
            <div className='wrap-v1 nav'>
                {
                    dicoverMenu.map((item,index)=>{
                        return (
                            <div key={index} className='item'>
                                 <NavLink to={item.link}>{item.title}</NavLink>
                        </div>
                        )
                    })
                }
            </div>
        </div>
        {/* 二级路由 */}
        {renderRoutes(props.route.routes)}
    </div>)
}
)